From: Kenichi Handa Date: Tue, 14 Apr 2009 01:26:03 +0000 (+0000) Subject: (xfont_has_char): The font has C if C is ASCII and the X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~858 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=a5e670bfdcad59a7e4c25c958bee71eef1f9dc0d;p=emacs.git (xfont_has_char): The font has C if C is ASCII and the encoding charset is ascii_compatible. --- diff --git a/src/xfont.c b/src/xfont.c index 6a9a46ec35e..bae63ac8555 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -798,10 +798,13 @@ xfont_has_char (entity, c) int c; { Lisp_Object registry = AREF (entity, FONT_REGISTRY_INDEX); + struct charset *encoding; struct charset *repertory; - if (font_registry_charsets (registry, NULL, &repertory) < 0) + if (font_registry_charsets (registry, &encoding, &repertory) < 0) return -1; + if (ASCII_CHAR_P (c) && encoding->ascii_compatible_p) + return 1; if (! repertory) return -1; return (ENCODE_CHAR (repertory, c) != CHARSET_INVALID_CODE (repertory));